<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="~{inc/fragments :: header}">
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col">
            <h1>登录</h1>
            <p>
                <a href="/">返回首页</a>
                <a href="/register">注册</a>
            </p>
        </div>
    </div>
    <div class="row">
        <div class="col-6">
            <div th:if="${loginFailedMsg} != '' " th:text="${loginFailedMsg}" class="alert alert-danger">登录失败</div>

            <form method="POST" action="/doLogin">
                <div class="form-group">
                    <label for="username">用户名</label>
                    <input type="text" class="form-control" id="username" name="username">
                </div>
                <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" class="form-control" id="password" name="password">
                </div>
                <button type="submit" class="btn btn-primary">登录</button>
            </form>
        </div>
    </div>
</div>

<div th:replace="~{inc/fragments :: js}"></div>
</body>
</html>